home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / DOCZ16.ZIP;1 / DOCZ.LIF / DOCREVS.COM < prev    next >
Encoding:
Text File  |  1994-04-24  |  3.9 KB  |  123 lines

  1. $! ****************************************************************************
  2. $!   DOCREVS.COM
  3. $!
  4. $!   This is an example of DOCZ System automation.
  5. $!
  6. $!   This command file notifies all programmers of revisions and fixes in
  7. $!   CSUB (a function library) and UTIL (a program library) since yesterday.    
  8. $!   The DOCZ System feature to generate revision notices and fix notices is
  9. $!   utilitized.    The assumption is made that this command file will be run
  10. $!   daily at the beginning of the day.  The notices are deposited in a
  11. $!   common directory where they can be picked-up and perused by programmers.
  12. $!
  13. $!       DIR_TEMP                        directory used for temporary files
  14. $!       SYS$USER:[COMMON.DOC]     notices depository directory
  15. $!       DIR_COMMON:MAILFILE.COM    MAIL utility command file (see UTIL docs)
  16. $!
  17. $!   Note:    subroutines were implemented in VMS 4.5, consequently this
  18. $!   procedure will not run under earlier VMS versions
  19. $! ****************************************************************************
  20. $!
  21. $    SET NOON
  22. $    TAB = "  "
  23. $!   The NOTIFY_LIST variable contains a list of recipients for the notices
  24. $!   It may contain discrete names or names of distribution list(s), as in
  25. $!   NOTIFY_LIST = "@SYS$MANAGER:LIST_OF_DEVELOPERS.DIS".  This will passed
  26. $!   to the MAIL utility.
  27. $    NOTIFY_LIST = "TODD,ROGER"      ! two recipients
  28. $!
  29. $    WRITE SYS$OUTPUT -
  30.     "*** Generating update notice"
  31. $    SET DEFAULT DIR_TEMP             ! directory used for creating temporary files
  32. $!  note:  default date format (MM/DD/YY) is used here
  33. $    TIMESTR = F$CVTIME("YESTERDAY",,"MONTH")+"/"-
  34.     +F$CVTIME("YESTERDAY",,"DAY")+"/"-
  35.     +F$EXTRACT(2,2,F$CVTIME("YESTERDAY",,"YEAR"))
  36. $    OPEN/WRITE MSGFILE REVMSG.TXT
  37. $!
  38. $    DOC CSUB /R='TIMESTR'
  39. $    FRED = $STATUS
  40. $    RENAME/LOG CSUB.DOC CSUB.REV
  41. $    IF FRED .EQ. 3 THEN CALL NO_REV "CSUB Revisions"
  42. $    IF FRED .NE. 3 THEN CALL YES_REV -
  43.     "CSUB Revisions" -
  44.     CSUB.REV -
  45.     SYS$USER:[COMMON.DOC]                ! deposit directory
  46. $!
  47. $    DOC CSUB /F='TIMESTR'
  48. $    FRED = $STATUS
  49. $    RENAME/LOG CSUB.DOC CSUB.FIX
  50. $    IF FRED .EQ. 3 THEN CALL NO_REV "CSUB Fixes"
  51. $    IF FRED .NE. 3 THEN CALL YES_REV -
  52.     "CSUB Fixes" -
  53.     CSUB.FIX -
  54.     SYS$USER:[COMMON.DOC]
  55. $!
  56. $    DOC CSUB /I='TIMESTR'
  57. $    FRED = $STATUS
  58. $    RENAME/LOG CSUB.DOC CSUB.NEW
  59. $    IF FRED .EQ. 3 THEN CALL NO_REV "CSUB Introductions"
  60. $    IF FRED .NE. 3 THEN CALL YES_REV -
  61.     "CSUB Introductions" -
  62.     CSUB.NEW -
  63.     SYS$USER:[COMMON.DOC]
  64. $!
  65. $    DOC UTIL /R='TIMESTR'
  66. $    FRED = $STATUS
  67. $    RENAME/LOG UTIL.DOC UTIL.REV
  68. $    IF FRED .EQ. 3 THEN CALL NO_REV "UTIL Revisions"
  69. $    IF FRED .NE. 3 THEN CALL YES_REV -
  70.     "UTIL Revisions" -
  71.     UTIL.REV -
  72.     SYS$USER:[COMMON.DOC]
  73. $!
  74. $    DOC UTIL /F='TIMESTR'
  75. $    FRED = $STATUS
  76. $    RENAME/LOG UTIL.DOC UTIL.FIX
  77. $    IF FRED .EQ. 3 THEN CALL NO_REV "UTIL Fixes"
  78. $    IF FRED .NE. 3 THEN CALL YES_REV -
  79.     "UTIL Fixes" -
  80.     UTIL.FIX -
  81.     SYS$USER:[COMMON.DOC]
  82. $!
  83. $    DOC UTIL /I='TIMESTR'
  84. $    FRED = $STATUS
  85. $    RENAME/LOG UTIL.DOC UTIL.NEW
  86. $    IF FRED .EQ. 3 THEN CALL NO_REV "UTIL Introductions"
  87. $    IF FRED .NE. 3 THEN CALL YES_REV -
  88.     "UTIL Introductions" -
  89.     UTIL.NEW -
  90.     SYS$USER:[COMMON.DOC]
  91. $!
  92. $    CLOSE MSGFILE
  93. $    SUBMIT/NOLOG/NONOTIFY/NOPRINT/-
  94.     PARAM=("CSUB and UTIL Daily Updates for ''TIMESTR'",-
  95.     "DIR_TEMP:REVMSG.TXT",-
  96.     'NOTIFY_LIST',-
  97.     "DELETE") -
  98.     DIR_COMMON:MAILFILE                        ! see UTIL documentation for MAILFILE
  99. $    PURGE/NOLOG/KEEP=5 SYS$USER:[COMMON.DOC]    ! keep last 5 days of notices
  100. $    EXIT
  101. $!
  102. $!  dcl subroutines
  103. $!
  104. $ NO_REV: SUBROUTINE                     ! no notices for this library
  105. $!  p1 = message
  106. $    WRITE MSGFILE P1,":",TAB,"NONE"
  107. $ ENDSUBROUTINE
  108. $!
  109. $ YES_REV: SUBROUTINE                    ! generate notice message for this library
  110. $!  p1 = message
  111. $!  p2 = file for notice
  112. $!  p3 = deposit directory
  113. $    SET NOON
  114. $    WRITE MSGFILE P1,":",TAB,P3,P2
  115. $    COPY/LOG 'P2' 'P3'
  116. $    DELETE/NOCONFIRM 'P2';
  117. $ ENDSUBROUTINE
  118. $!
  119. $! ****************************************************************************
  120. $!   end DOCREVS.COM
  121. $! ****************************************************************************
  122.  
  123.